﻿using socialnetworkApp.Core;
using socialnetworkApp.Domain.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace socialnetworkApp.Domain.IRepository.Repository
{
    public class RoleRepository :RepositoryBase<Role>, IRoleRepository
    {

        public async Task<List<Role>> GetRoleInfoByIdsAsync(List<string> RIds,string sql)
        {
            var roles = new List<Role>();

            foreach (var RId in RIds)
            {

                var role = await SelectFirst(new Role { Id = RId }, sql);
                roles.Add(role);
            }

            return roles;
        }
    }
}
